#include <iostream>
class DataBase{
private:
    DataBase();
public:
    static DataBase* instance;
    static DataBase* getInstance()
    {
        if(instance == nullptr)
        {
            instance = new DataBase();
        }
        return instance;
    }
    void printMessage()
    {
        std::cout<<"this is Singleton"<<std::endl;
    }
};
DataBase* DataBase::instance = nullptr;
int main() {
    DataBase *p = DataBase::getInstance();
    p->printMessage();
    return 0;
}
